//
//  Account.swift
//  开心微博
//
//  Created by 郑开心 on 15/12/9.
//  Copyright © 2015年 郑开心. All rights reserved.
//

import UIKit
import SwiftyJSON

class Account: Reflect {
    
    var access_token : String!
    var expires_in : String!
    var uid : String!
    var remind_in : String!
    var name : String?
    
    var expires_date : NSDate!{
        get{
            let x = Double(expires_in)!
            let expires_date = NSDate(timeIntervalSinceNow: x)
            return expires_date
        }
    }
    required init(){}
    
    required init(json: JSON) {
        self.access_token = json["access_token"].stringValue
        self.expires_in = json["expires_in"].stringValue
        self.uid = json["uid"].stringValue
        self.remind_in = json["remind_in"].stringValue
    }



    
}
